{include file="public/hunanconstr_meta" /}
<link href="__PUBLIC_ADMIN__css/plugins/footable/footable.core.css" rel="stylesheet">
<style>
#huiedit{
	background-color: #1ab394;
	color: #FFFFFF;
}
#huidel{
	background-color: #ed5565;
	color: #FFFFFF;
}
#hui{
	 width: 50px;
        height: 50px;
}
</style>
</head>

<body class="gray-bg">
   <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                    <a href="{:url('admin/Meeting/userDownload')}?meeting_id={$meeting_id}" id="huiedit" class="btn btn-white btn-sm">嘉宾列表导出 </a>
                        <div class="ibox-tools">
                            <a href="{:url('admin/Meeting/userListAdd')}?meeting_id={$meeting_id}" class="btn btn-primary btn-sm">添加内容</a>
                        </div>
                        
                    </div>
                    <div class="ibox-content">
                        <div class="row m-b-sm m-t-sm">
                            <div class="col-md-1">
                                <button type="button" id="loading-example-btn" class="btn btn-white btn-sm refresh" ><i class="fa fa-refresh"></i> 刷新</button>
                                 <a href="{:url('admin/Meeting/meetinglist')}" class="btn btn-primary btn-xs">返回列表</a>
                            </div>

                        </div>
                        
						<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="50" data-filter=#filter>
                            <thead>
                                    <tr>
                                        <th>序列</th>
                                        <th>类别</th>
                                        <th>姓名</th>
                                        <th>电话</th>
                                        <th>性别</th>
                                        <th data-hide="all">身份证</th>
                                        <th data-hide="all">职务</th>
                                        <th data-hide="all">城市</th>
                                        <th>单位</th>
                                        <th data-hide="all">职称</th>
                                        <th data-hide="all">其他联系人</th>
                                        <th data-hide="all">其他联系人电话</th>
                                        <th>创建时间</th>
                                        <th>操作</th>
                                        <th>查看行程</th>
                                        <th>出票情况</th>
                                        <th>酒店安排情况</th>
                                        <th>车辆安排情况</th>
                                        <th>任务书</th>
                                    </tr>
                                </thead>
                                <tbody>
                                	{foreach name="res" id="vo" key="key"}
                                    <tr class="gradeX">
                                        <td>{$key+1}</td>
                                        <td>{$vo.type}</td>
                                        <td>{$vo.name}</td>
                                        <td>{$vo.mobile}</td>
                                        <td>{if condition="$vo.gender eq 1"}男{else/}女{/if}</td>
                                        <td>{$vo.id_card}</td>
                                        <td>{$vo.position}</td>
                                        <td>{$vo.city}</td>
                                        <td>{$vo.company}</td>
                                        <td>{$vo.title}</td>
                                        <td>{$vo.travel_contact}</td>
                                        <td>{$vo.travel_mobile}</td>
                                        <td>{$vo.create_time|date="Y-m-d H:i:s",###}</td>
                                        <td>
                                            <a href="{:url('admin/Meeting/userListEdit',['id'=>$vo.id,'meeting_id'=>$vo.meeting_id])}" id="huiedit" class="btn btn-white btn-xs edit">编辑 </a>
                                            <a href="{:url('admin/Meeting/userListDel',['id'=>$vo.id,'meeting_id'=>$vo.meeting_id])}" id="huiedit" class="btn btn-white btn-xs">删除 </a>
                                        </td>
                                        {if condition="$vo.travel_id neq null"}
                                        <td><a href="{:url('admin/Meeting/travelListEdit',['id'=>$vo.travel_id])}" id="huiedit" class="btn btn-white btn-xs edit">查看行程 </a></td>
                                        {else/}
                                        <td><a href="{:url('admin/Meeting/travelListAdd',['id'=>$vo.id,'meeting_id'=>$vo.meeting_id])}" id="huiedit" class="btn btn-white btn-xs edit">新增行程 </a></td>
                                        {/if}
                                        <td>{if condition="($vo.go_money eq 0) AND ($vo.back_money eq 0)"}无
                                        {else/}
                                        {if condition="$vo.go_money neq 0"}
                                        <span style="display: block;">来程：{$vo.go_money} - {$vo.go_service}</span><br>
                                        {/if}
                                        {if condition="$vo.back_money neq 0"}
                                        <span style="display: block;">返程：{$vo.back_money} - {$vo.back_service}</span>
                                        {/if}
                                        {/if}</td>
                                        {if condition="$vo.hotel_id neq null"}
                                        <td><a href="{:url('admin/Meeting/userHotel',['id'=>$vo.travel_id])}" id="huiedit" class="btn btn-white btn-xs edit">查看酒店 </a></td>
                                        {else /}
                                        <td>暂无酒店信息</td>
                                        {/if}
                                        {if condition="$vo.car_id neq null"}
                                        <td><a href="{:url('admin/Meeting/userCar',['meeting_id'=>$vo.meeting_id,'user_id'=>$vo.id])}" id="huiedit" class="btn btn-white btn-xs edit">查看用车 </a></td>
                                        {else /}
                                        <td>暂无车辆信息</td>
                                        {/if}
                                        <td><a>
                                        <form  class="staffFile" action="{:url('admin/Meeting/task')}" enctype="multipart/form-data" method="post" > 
                                            <input type="hidden" name="id" value="{$vo.id}">
                                            <input type="hidden" name="meeting_id" value="{$vo.meeting_id}">
                                            <input type="file" name="file" class="importStaffFile" style="float: left; display: none" />
                                            <button type="button" class="btn btn-primary btn-xs importStaff" style="float: left;" >设置任务书</button>
                                        </form></a>
                                        {if condition="$vo.task_url neq null"}
                                        <a target="_blank" href="/{$vo.task_url}" data-url="" id="huiedit" class="btn btn-white btn-xs">查看任务书 </a>
                                        {/if}
                                        </td>
                                        <td></td>
                                    </tr>
                                    {/foreach}
                                </tbody>
                                <tfoot hidden="hidden">
                                    <tr>
                                        <td colspan="5">
                                            <ul class="pagination pull-right"></ul>
                                        </td>
                                    </tr>
                                </tfoot>   
                        </table>
                        <div class="item-page" style="padding-left:36%;">
                        
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
        
    {include file="public/_footer" /}
	<script src="__PUBLIC_ADMIN__js/plugins/footable/footable.all.min.js"></script>
	
    <!-- 自定义js -->
    <script src="__PUBLIC_ADMIN__js/content.js?v=1.0.0"></script>
    <script>
        $(document).ready(function() {
            $('.footable').footable();
            $('.footable2').footable();
			
            $('.refresh').click(function(){
            	window.location.reload();	// 刷新页面
            })
            
          	//iframe窗
          	$('.edit').click(function(){
                var url = $(this).attr('data-url');
          		var index = layer.open({
          			type : 2,
					fixed: true,
					scrollbar: false,
					title : '编辑',
					shadeClose : false,
					maxmin : true, //开启最大化最小化按钮
					area : ['893px', '600px'],
					//offset: '100px',
					content : url
          		});
          		layer.full(index);
          	})
		});
	</script>
<script>
    $(document).ready(function(){
        $(".importStaff").click(function(){
            $(this).prev('.importStaffFile').trigger("click"); 
        })
        
        $(".importStaffFile").change(function(){
          $(this).parent(".staffFile").submit()
        });
    })
</script>
</body>
</html>
